package com.ruoyi.paint.admin.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 配色方案色母关联表
 * @TableName tq_schemetints
 */
@TableName(value ="tq_schemetints")
@Data
public class TqSchemetints implements Serializable {
    /**
     * 关联ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 配色方案ID，外键关联ColorSchemes表
     */
    private Long schemeId;

    /**
     * 色母ID，外键关联Tints表
     */
    private Long tintId;

    /**
     * 图层类型
     */
    private Object layerType;

    /**
     * 净重
     */
    private Double netWeight;
    private Double total;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime; // 创建时间

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime; // 更新时间

    @TableField(fill = FieldFill.INSERT)
    private String createBy; // 创建人

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateBy; // 更新人
    /** 备注 */
    private String remark;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TqSchemetints other = (TqSchemetints) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getSchemeId() == null ? other.getSchemeId() == null : this.getSchemeId().equals(other.getSchemeId()))
            && (this.getTintId() == null ? other.getTintId() == null : this.getTintId().equals(other.getTintId()))
            && (this.getLayerType() == null ? other.getLayerType() == null : this.getLayerType().equals(other.getLayerType()))
            && (this.getNetWeight() == null ? other.getNetWeight() == null : this.getNetWeight().equals(other.getNetWeight()))
            && (this.getDelFlag() == null ? other.getDelFlag() == null : this.getDelFlag().equals(other.getDelFlag()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getSchemeId() == null) ? 0 : getSchemeId().hashCode());
        result = prime * result + ((getTintId() == null) ? 0 : getTintId().hashCode());
        result = prime * result + ((getLayerType() == null) ? 0 : getLayerType().hashCode());
        result = prime * result + ((getNetWeight() == null) ? 0 : getNetWeight().hashCode());
        result = prime * result + ((getDelFlag() == null) ? 0 : getDelFlag().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", schemeId=").append(schemeId);
        sb.append(", tintId=").append(tintId);
        sb.append(", layerType=").append(layerType);
        sb.append(", netWeight=").append(netWeight);
        sb.append(", delFlag=").append(delFlag);
        sb.append(", createBy=").append(createBy);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", remark=").append(remark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}